local Client = {}
Client.__index = Client

Tubes.Client = Tubes.MakeConstructor (Client)

function Client:ctor (ply)
	self.Player = ply
	
	self.WatchedFileSystemItems = {}
	
	if SERVER then
		for _, Group in Tubes.Permissions.GetGroupIterator () do
			Tubes.Networking.Send ("GroupCreated", ply, Group:GetOwnerSteamID (), Group:GetName ())
			if Group:HasCachedMembers () then
				Tubes.Networking.Send ("GroupMembersAdded", ply, Group, nil)
			end
		end
	end
end

function Client:Drop ()
	for Item, _ in pairs (self.WatchedFileSystemItems) do
		Item:RemoveEventListener ("", tostring (self))
	end
end